package com.example.graduationdesign.pojo.vo;

/**
 * 返回结果状态码
 */
public enum ResultCode {
    /* 成功状态码 */
    SUCCESS(200, "成功"),

    /* 参数错误：10001-19999 */
    PARAM_IS_INVALID(10001, "参数无效"),
    PARAM_IS_BLANK(10002, "参数集合为空"),
    PARAM_TYPE_BIND_ERROR(10003, "参数类型错误"),
    PARAM_IS_NULL(10004, "参数为null"),

    EMAIL_IS_EXIST(10004,"该邮箱已存在"),

    /* 用户错误：20001-29999*/
    USER_NOT_LOGIN(20001, "用户未登录"),
    USER_LOGIN_ERROR(20002, "账号不存在或密码错误"),
    USER_ACCOUNT_FORBIDDEN(20003, "账号已被禁用"),
    USER_NOT_EXIST(20004, "用户不存在"),
    USER_HAS_EXISTED(20005, "用户已存在"),
    USER_PWD_ERROE(20006, "密码错误"),
    USER_ROLE_NOT_EXIST(20007, "用户角色已停用"),
    USER_EMAIL_NOT_EXIST(20008, "该邮箱不在服务器内"),
    VERIFICATION_CODE(20009, "验证码无效"),
    QUESTION_BANK_SUBMIT_ERROR(20010, "题库提交数据错误"),

    /* 业务错误：30001-39999 */
    SPECIFIED_QUESTIONED_USER_NOT_EXIST(30001, "业务出现问题"),
    FILE_UPLOAD_FAIL(30002, "文件上传失败"),
    NOT_EXAM(30002, "请传入注册报名材料的编码!"),
    NOT_EXAM_CODE(30003, "该考试不存在!"),
    NOT_MATERIALS_STRUCTURE(30004, "该材料结构不存在!"),
    NOT_STUDENT(30009, "该学员不存在!"),
    NOT_STUDENT_EXAM(30010, "该学员还没有考试!"),
    NOT_MATERIALS(30005, "该材料不存在!"),
    HAD_EXAM_CODE(30006, "该考试已存在!"),
    NOT_TRAINEE_EXAM(30007, "该学员没有提交报名材料!"),
    NOT_TRAINEE_APPLY(30008, "该学员没有提交考试材料!"),
    NOT_EXAM_APPLY(30011, "该学员没有报名!"),


    /* 系统错误：40001-49999 */
    SYSTEM_INNER_ERROR(40001, "系统繁忙，请稍后重试"),

    /* 数据错误：50001-599999 */
    RESULE_DATA_NONE(50001, "数据未找到"),
    DATA_IS_WRONG(50002, "数据有误"),
    DATA_ALREADY_EXISTED(50003, "数据已存在"),
    DATA_STATUS_STOP(50004, "数据状态已停用"),
    DATA_STATUS_START(50005, "数据状态已启用"),
    DATA_IS_NULL(50006, "数据为null"),

    /* 接口错误：60001-69999 */
    INTERFACE_INNER_INVOKE_ERROR(60001, "内部系统接口调用异常"),
    INTERFACE_OUTTER_INVOKE_ERROR(60002, "外部系统接口调用异常"),
    INTERFACE_FORBID_VISIT(60003, "该接口禁止访问"),
    INTERFACE_ADDRESS_INVALID(60004, "接口地址无效"),
    INTERFACE_REQUEST_TIMEOUT(60005, "接口请求超时"),
    INTERFACE_EXCEED_LOAD(60006, "接口负载过高"),

    /* 权限错误：70001-79999 */
    PERMISSION_NO_ACCESS(70001, "无访问权限");

    private int code;
    private String message;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    ResultCode() {
    }


}
